﻿using ContactCenter.Core.ObjectModel;
using FluentNHibernate.Cfg;
using NHibernate.Cfg;

namespace ContactCenter.AuditEventListener
{
    public class AuditListenerMappingTask : IConfigurationTask<Configuration>
    {
        public bool CanConfigure()
        {
            return true;
        }

        public Configuration Configure(Configuration configuration)
        {
            Fluently.Configure(configuration)
                .Mappings(m => m.FluentMappings.AddFromAssemblyOf<AuditListenerTask>())
                .BuildConfiguration();

            return configuration;
        }

        public int Position
        {
            get { return 100; }
        } 
    }
}
